Conversation
…ngoDatabase access
There was a problem hiding this comment.
In general, this looks good.
MongoDBTargetSystemInitiative makes sense here, but MongoDatabaseAccessor isn’t needed in this case. I assume you added it to avoid propagating the wrong ReadConcern, WriteConcern, and ReadPreference. However, the audit store collections are created using the settings from the actual auditStore, and those take precedence over any database defaults, so this is safe.
That means we can use the database directly in the targetSystem, which is fine. The only constraint is that the TargetSystem must be initialized before the AuditStore. That’s a logical rule we can (and should) enforce.
To do that, we need to update AbstractBuilder.configureStoreAndTargetSystem:L84 so the initialization order guarantees this (it’s currently the other way around).
…ngoDatabase access
No description provided.